package com.wayne.oauth2.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wayne.oauth2.entity.Role;
import com.wayne.oauth2.entity.UserInfo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserInfoMapper extends BaseMapper<UserInfo> {
    @Select("select rid id,role_name roleName from sys_user_role a,sys_role sr where a.rid =sr.id and uid =#{userId}")
    List<Role> selectRoles(Integer userId);
}
